home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / language / forth_83.zoo / diverses.scr < prev    next >
Text File  |  1992-04-07  |  10KB  |  1 lines

  1. \\                       *** Diverses ***              26oct86we                                                                In diesem File haben wir Worte untergebracht, die zwar häufig    gebraucht werden, aber nicht bestimmten Files zugeordnet werden können.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        \ Loadscreen für Diverses                              26oct86we                                                                Onlyforth                                                                                                                       1 2  +thru                                                                                                                      ' .blk Is .status                                                                                                                                                                               \ 3 +load   setvec                                                                                                                                                                                                                                                                                                                                                                                                                                              \ Häufig benutzte Definitionen                         26oct86we                                                                : >absaddr   ( addr -- abs_laddr )       0  forthstart d+ ;                                                                     : .blk     ( -- )         blk @   ?dup   0= ?exit                    dup 1 =  IF  cr file?  THEN   ."  Blk " . ?cr ;                                                                            : abort(  ( f -- )                                                 IF  [compile] .(  true abort"  !"  THEN  [compile] ( ;                                                                       \needs arguments   abort( use definition in FILEINT.SCR)                                                                                                                                                                                                                                                                                                                                        \ Häufig benutzte Definitionen II                      26oct86we                                                                | Create: cpull                                                       rp@ count  2dup + even rp!  r> swap cmove ;                                                                               : cpush  ( addr len --)   r> -rot  over >r                            rp@ over 2+ -  even dup rp!  place  cpull >r  >r ;                                                                                                                                        : bell                           7 con! ;                       : blank    ( addr count -- )     bl fill ;                                                                                                                                                                                                                                                                                                                                                      \ TOS-Alerts abschalten                                16oct86we                                                                Create oldvec   4 allot                                                                                                         Label newvector                                                    -8 D1 cmpi  0<> IF  -&13 D1 cmpi  0<>  IF                         .l oldvec pcrel) A2 move   A2 ) jmp   THEN  THEN              .l D1 D0 move   rts   end-code                                                                                               : setvec    $0.0404 l2@  oldvec 2!                                          newvector >absaddr   $0.0404 l2! ;                                                                                  : restvec   oldvec 2@ $0.0404 l2! ;                                                                                             : bye       restvec bye ;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       \ Loadscreen für Diverses                              26oct86we                                                                setzt Searchorder auf     FORTH FORTH ONLY    FORTH                                                                             kompiliert die nächsten 2 Screens.                                                                                              .STATUS ist ein 'deferred word', das jeweils beim Kompilieren    eines Quelltextscreens aufgerufen wird.                                                                                        Screen 4 wird nicht mitkompiliert, denn SETVEC muß nach jedem    Neustart wieder aufgerufen werden. Falls Sie diese Funktion     nutzen wollen, müssen Sie nach jedem Laden SETVEC eingeben.     (Dazu muß natürlich Screen 4 kompiliert worden sein.)                                                                                                                                                                                                          \ Häufig benutzte Definitionen                         26oct86we                                                                >ABSADDR    rechnet eine - relative- Adresse im FORTH-System in             eine absolute 32-Bit-Adresse um.                    .BLK        gibt die Nummer des gerade kompilierten Screens aus,            bei Screen 1 auch den Filenamen.                                                                                    ABORT(      bewirkt das gleiche wie ABORT", ist aber im Direkt-             modus zulässig.                                                                                                     ARGUMENTS   prüft, ob eine bestimmte (Mindest-)Anzahl von Werten            auf dem Stack liegt. Dieses Wort ist bereits im                 FORTHKER.PRG vorhanden, da es vom File-Interface                gebraucht wird.